<style lang='scss' type='stylesheet/scss' scoped>
.as-button {
  margin-bottom: 10px;
}
</style>
<template>
  <div>
    <as-h2>type</as-h2>
    <as-card :text="text"
             title="message 拥有 info 信息 / success 成功 / warning 警告 / error 错误 四种类型">
      <as-button @click="handlerInfo">信息</as-button>
      <as-button @click="handlerSuccess"
                 type="success">成功</as-button>
      <as-button @click="handlerWarning"
                 type="warning">警告</as-button>
      <as-button @click="handlerError"
                 type="danger">错误</as-button>
    </as-card>
  </div>
</template>

<script type="text/ecmascript-6">
import { mapGetters } from "vuex";
export default {
  name: "",
  computed: {
    ...mapGetters(["isMobile"])
  },
  data() {
    return {
      name: "12345678901",
      text: `<template>
   <div>
     <as-button @click="handlerInfo">信息</as-button>
     <as-button @click="handlerSuccess" type="success">成功</as-button>
     <as-button @click="handlerWarning" type="warning">警告</as-button>
     <as-button @click="handlerError" type="danger">错误</as-button>
   </div>
 </template>
 <script>  
 export default{
   methods: {
     handlerError() {
       this.$notify.error("点击了错误");
     },
     handlerSuccess() {
       this.$notify.success("点击了成功");
     },
     handlerWarning() {
       this.$notify.warning("点击了警告");
     },
     handlerInfo() {
       this.$notify.info("点击了信息");
     },
   }
 }
 <\/script>`
    };
  },
  methods: {
    handlerError() {
      this.$notify.error("点击了错误");
    },
    handlerSuccess() {
      this.$notify.success("点击了成功");
    },
    handlerWarning() {
      this.$notify.warning("点击了警告");
    },
    handlerInfo() {
      this.$notify.info("点击了信息");
    }
  }
};
</script>
